package day12;

import java.util.concurrent.TimeUnit;

public class Work implements Runnable {

    private int num = 0;

    @Override
    public void run() {
        int max = 50;
        while (num <= max) {
            System.out.println("员工完成工件数:" + num++);
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        System.out.println("超出预期");
    }
}
